

export default function loadFiles (dataFiles) {
    return new Promise(((resolve, reject) => {
        Promise.all(dataFiles.map(dataFile => {
            return axios.get(dataFile.url).then(res => ({date:new Date(res), data:res}))
        })).then(files => {
            resolve(files)
        }).catch(err =>{
            reject(err)
        })
    }))
}
